// Copyright (c) Microsoft Corporation
// All rights reserved

namespace Microsoft.Windows.Controls.Specialized.TextModel
{
    using System;

    /// <summary>
    /// Describes the Text Change event
    /// </summary>
    public class TextChangedEventArgs : EventArgs
    {
        #region Private Members

        private ITextVersion _version;
        private ITextEdit _source;

        #endregion // Private Members

        /// <summary>
        /// Constructs a Text Changed event args to be passed during a Change event
        /// </summary>
        /// <param name="source">
        /// The ITextEdit that caused this change
        /// </param>
        /// <param name="version">
        /// The 
        /// </param>
        public TextChangedEventArgs(ITextEdit source, ITextVersion version)
        {
            _source = source;
            _version = version;
        }

        /// <summary>
        /// Gets the version at which this change happened
        /// </summary>
        public ITextVersion PriorVersion
        {
            get
            {
                return _version;
            }
        }

        /// <summary>
        /// Gets the source that caused this change
        /// </summary>
        public ITextEdit Source
        {
            get
            {
                return _source;
            }
        }
    }
}
